package org.jeecg.modules.sggg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.modules.sggg.entity.SgMember;

import java.util.List;
import java.util.Map;

/**
 * @Description: 居民表
 * @Author: jeecg-boot
 * @Date: 2022-10-17
 * @Version: V1.0
 */
public interface SgMemberMapper extends BaseMapper<SgMember> {

    SgMember queryByPhone(String phone);

    List<Map<String, Object>> querydoctorNum(String orgCode);

    List<Map<String, Object>> blutdruckListByMid(String memberId, Integer type);

    List<Map<String, Object>> glucoseListByMid(String memberId, Integer type);

    List<Map<String, Object>> interveneListByMid(String memberId, Integer type);

    /**
     * @return java.util.List<org.jeecg.modules.sggg.entity.SgMember>
     * @Description 获取今日新增的居民信息
     * @Author 穆雄雄
     * @Date: 2023/4/7 上午 8:46
     * 博客：https://blog.csdn.net/qq_34137397
     * 个人站：https://www.穆雄雄.com
     * 个人站：https://www.muxiongxiong.cn
     * 个人站：https://88688.team
     * @Param [orgCode 机构编码, roleCode 角色编码, doctorId 所属医生id, date 日期]
     **/
    List<SgMember> getAddMemberByToday(String orgCode, String roleCode, String doctorId, String date,List<String> responsibleAgencies);

    Boolean updateCurrencyById(String memberId, Integer currency);

    IPage<SgMember> memberCurrencyRanking(IPage<SgMember> page, String name, Integer sex, String phone,List<String> responsibleAgencies, String idCard, String threeTag, String sysOrgCode, String roleCode, String orgCode,String userId);

    Integer getincreaseCount(String orgCode,String id);

    List<Map<String, Object>> getThreeHighDiseaseTrend(String region);

    List<Map<String, Object>> getHighRiskWarning(String departCode);

    Boolean deleteByIds(String ids);
}
